/**
 * Created by Administrator on 2016/7/19.
 */
//上传封面
function coverImgChange(obj) {

    var file = $(obj).val();
    if(!file){
        return false;
    }

    $("#imgForm").ajaxSubmit({
        dataType: 'json',
        beforeSubmit: function () {
            $(obj).parents("#coverImgInfo").find("#coverShopImg").html('上传中……');
        },
        success: function (data) {
            console.log(data);
            $(obj).parents("#coverImgInfo").find("#coverShopImg").html('<a target="_blank" href=' + data + '>预览</a>');
            $(obj).parents("#coverImgInfo").find(".shoppic").val(data);
            standardTips('上传成功！');
        }
    });
}
